AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones RTF
  • Finding a character string
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Finds a character string in an RTF control (found in a window or in a WINDEV report) or in a character string containing text in RTF format.
Example
// Passer tous les "WINDEV" d'un texte en rouge souligné
I is int
I = RTFSearch(SAI_Saisie1, "WINDEV")
WHILE I > 0
// Passage en rouge
RTFSélection(SAI_Saisie1, rtfColor, LightRed, I, 6)
// Passage en souligné
RTFSélection(SAI_Saisie1, rtfUnderlined, True, I, 6)
// Recherche du "WINDEV" suivant
I = RTFSearch(SAI_Saisie1, "WINDEV", rtfCaseSensitive, I + 1)
END
nRes is int
sChaîne is string = SAI_Saisie1
// ****** UTILISE UNE VARIABLE DE TYPE CHAÎNE
// Recherche des mots contenant le mot "RTF"
nRes = RTFSearch(sChaîne, "RTF", rtfFullWord, 1)
WHILE nRes <> 0
nRes = RTFSearch(sChaîne, "RTF", rtfFullWord, nRes + 3)
END
Syntax
<Result> = RTFSearch(<RTF control or string> , <String to find> [, <Options> [, <Start>]])
<Result>: Integer
  • Position of the first character of the search string within the initial string.
  • 0 if the search string is not found.
The RTF formatting is ignored.
<RTF control or string>: Character string
Name of the RTF control or RTF string where the search will be performed.
<String to find>: Character string
Character string that must be found in the control or in the string.
<Options>: Optional constant (or combination of constants)
Indicates the parameters for the search:
rtfCaseSensitiveThe search is case sensitive.
rtfFullWordOnly the full words are sought.
<Start>: Optional integer
Position of the character from which the specified string is sought.
If this parameter is not specified, the search starts at the cursor position (or at the end of the selected text) and continues until the end of the text in the control or string.
Remarks

Finding a character string

  • By default, the search is case insensitive and all the specified characters are sought.
  • The search is performed from the end of the selection (position of the mouse cursor) until the end of the text found in the control or string.
  • To continue a search from the first element found, the parameter must be set to 0.. For example:
    nPos = RTFRecherche(SAI_Texte, chaîne_recherchée, 0, nPos+1)
Component: wd290obj.dll
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 06/07/2023

Señalar un error o enviar una sugerencia | Ayuda local